package com.example.star.api_service;

import com.example.star.entity.Post;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;

public interface PostApi {
    @GET("api/posts")
    Call<List<Post>> getAllPosts();

    @POST("api/posts")
    Call<Void> addPost(@Body Post post);
}